// https://www.acwing.com/problem/content/793/

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;


string add(vector<int>& nums1, vector<int>& nums2) {
    for (int i=0; i<nums1.size(); i++) {
        nums1[i] += nums2[i];
        if (nums1[i] >= 10) {
            nums1[i] %= 10;
            nums1[i+1]++;
        }
    }

    string result;
    if (nums1[nums1.size()-1] > 0) {
        result += nums1[nums1.size()-1] + '0';
    }
    for (int i=nums1.size()-2; i>=0; i--) {
        result += nums1[i] + '0';
    }

    return result;
}


int main() {
    string str1, str2;
    cin>>str1>>str2;
    int max_length = max(str1.length(), str2.length());
    int t1=0;

    vector<int> nums1(max_length + 1, 0);
    vector<int> nums2(max_length + 1, 0);

    for (int i=str1.length()-1; i >= 0; i--) {
        nums1[t1++] = str1[i] - '0';
    }

    int t2=0;
    for (int i=str2.length()-1; i >= 0; i--) {
        nums2[t2++] = str2[i] - '0';
    }

    cout<<add(nums1, nums2)<<endl;
    return 0;
}
